const px2viewport = require('@jonny1994/postcss-px-to-viewport');
const autoprefixer = require('autoprefixer');

module.exports = {
  plugins: [
    {
      postcssPlugin: '@unocss/postcss',
    },
    autoprefixer(),
    // px 自动转义 vh
    // https://github.com/Jonny-china/postcss-px-to-viewport/blob/HEAD/README_CN.md
    px2viewport({
      viewportWidth: 375,
      viewportUnit: 'vw',
      fontViewportUnit: 'vw',
      mediaQuery: true,
      rules: [],
    }),
  ],
};
